package com.zhss.eshop.inventory.mapper;

import com.zhss.eshop.inventory.domain.model.InventoryOfflineStockUpdateMessage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface InventoryOfflineStockUpdateMessageMapper {
    int deleteByPrimaryKey(Long id);

    int insertSelective(InventoryOfflineStockUpdateMessage record);

    InventoryOfflineStockUpdateMessage selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(InventoryOfflineStockUpdateMessage record);

    /**
     * 批量查询库存更新消息：每次50条
     * @return 库存更新消息DO对象集合
     */
    List<InventoryOfflineStockUpdateMessage> listByBatch();

    /**
     * 批量删除库存更新消息
     * @param messageIds 库存更新消息id集合字符串
     */
    void removeByBatch(@Param("messageIds") String messageIds);

    /**
     * 查询库存更新消息记录数
     * @return 库存更新消息记录数
     */
    Long count();
}
